import Mock from "mockjs";

const Random = Mock.Random;

export const mockdetails = function (){
    let list=[]

    for(let i=0;i<Random.integer(30,400);i++){
        const object = Mock.mock({
            "pk|1-100": 1,
            fields: {
                profitIdate:'@date(yyyy-MM-dd)',
                amount_change:'@float(-1000,1000,1,2)',
                cumulative_profit:'@float(-50000,50000,2,2)'
            }
        });
        list.push(object)
    }

    return {
        // list转字符串
        data: JSON.stringify(list), 
        flag: true,
      };
}